import turbogears   as tg

import logging
import cherrypy
import sqlobject
from sqlalchemy.exceptions import SQLError
import kaizen.controllers
from kaizen.model import Action,session
from turbogears import identity, expose, validate, validators, redirect, error_handler, flash, view
from formencode import validators

log = logging.getLogger("kaizen.subcontrollers.review")

class ReviewController:

    @expose(template="kaizen.templates.viewReview", content_type='text/html; charset=utf-8')
    @error_handler()
    def view(self, tg_errors=None, **keywords):
          actions = session.query(Action).select(Action.c.closed==False)
          print("-------------" +str(len(actions)))
          return dict(actions=actions, previousPage="kaizen.templates.viewReview")
